import { VxeSelect } from "vxe-table";
import { defineComponent } from "vue";

export default defineComponent({
  props: {
    modelValue: {
      type: Date,
      dafault: null,
    },
  },
  emits: ["update:modelValue", "change"],
  setup(props, { emit, slots }) {
    const onChange = ({ value }) => {
      emit("update:modelValue", value);
      emit("change");
    };
    return () => {
      return (
        <VxeSelect
          model-value={props.modelValue}
          multi-char-overflow={-1}
          {...props}
          onChange={onChange}
        />
      );
    };
  },
});
